<?php

namespace app\api\validate;

use think\Validate;

class Car extends Validate
{

    protected $rule = [
        'name' => ['require'],
        'price' => ['require', 'float', 'gt' => 0],
        'end_time' => ['require'],
        'desc' => ['require'],
        'goods_list' => ['require'],
        'select_index' => ['require'],
        'car_id' => ['require', 'number']
    ];

    protected $scene = [
        'create' => ['name', 'price', 'end_time', 'desc', 'goods_list'],
        'order' => ['select_index']
    ];
}